<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>

    <title>搜索 </title>

    <!-- Required meta tags always come first -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="x-ua-compatible" content="ie=edge">

    <!-- Main Font -->
    <script src="front/js/libs/webfontloader.min.js"></script>

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" type="text/css" href="front/Bootstrap/dist/css/bootstrap-reboot.css">
    <link rel="stylesheet" type="text/css" href="front/Bootstrap/dist/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="front/Bootstrap/dist/css/bootstrap-grid.css">

    <!-- Main Styles CSS -->
    <link rel="stylesheet" type="text/css" href="front/css/main.css">
    <link rel="stylesheet" type="text/css" href="common/font-awesome-4.7.0/css/font-awesome.min.css">
   <style>
       @font-face {
           font-family: "iconfont"; /* Project id 2547082 */
           src: url('//at.alicdn.com/t/font_2547082_q7bpufme7u9.woff2?t=1620909483500') format('woff2'),
           url('//at.alicdn.com/t/font_2547082_q7bpufme7u9.woff?t=1620909483500') format('woff'),
           url('//at.alicdn.com/t/font_2547082_q7bpufme7u9.ttf?t=1620909483500') format('truetype');
       }

       .iconfont {
           font-family: "iconfont" !important;
           font-size: 16px;
           font-style: normal;
           -webkit-font-smoothing: antialiased;
           -moz-osx-font-smoothing: grayscale;
       }

       .icon-qq:before {
           content: "\e604";
       }
   </style>
</head>
<body>

<!-- Preloader -->

<div id="hellopreloader">
    <div class="preloader">
        <svg width="45" height="45" stroke="#fff">
            <g fill="none" fill-rule="evenodd" stroke-width="2" transform="translate(1 1)">
                <circle cx="22" cy="22" r="6" stroke="none">
                    <animate attributeName="r" begin="1.5s" calcMode="linear" dur="3s" repeatCount="indefinite" values="6;22"/>
                    <animate attributeName="stroke-opacity" begin="1.5s" calcMode="linear" dur="3s" repeatCount="indefinite" values="1;0"/>
                    <animate attributeName="stroke-width" begin="1.5s" calcMode="linear" dur="3s" repeatCount="indefinite" values="2;0"/>
                </circle>
                <circle cx="22" cy="22" r="6" stroke="none">
                    <animate attributeName="r" begin="3s" calcMode="linear" dur="3s" repeatCount="indefinite" values="6;22"/>
                    <animate attributeName="stroke-opacity" begin="3s" calcMode="linear" dur="3s" repeatCount="indefinite" values="1;0"/>
                    <animate attributeName="stroke-width" begin="3s" calcMode="linear" dur="3s" repeatCount="indefinite" values="2;0"/>
                </circle>
                <circle cx="22" cy="22" r="8">
                    <animate attributeName="r" begin="0s" calcMode="linear" dur="1.5s" repeatCount="indefinite" values="6;1;2;3;4;5;6"/>
                </circle>
            </g>
        </svg>

        <div class="text">Loading ...</div>
    </div>
</div>

<div class="header-spacer-small"></div>
<!-- Top Header-Profile -->

<div class="container">
    <div class="row">
        <div class="col col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            <div class="ui-block">
                <div class="ui-block-title inline-items">


                    <h4 class="title">搜索【
                        <span th:if="${msg != null}" th:text="${msg}"></span>
                        <span th:if="${tag != null}" th:text="${'标签：' + tag.name}"></span>
                        <span th:if="${kind != null}" th:text="${'分类：' + kind.name}"></span>
                        <span th:if="${date != null}" th:text="${'归档：' + date}"></span>
                        】的结果( 共 [[${articleCount}]] 条 )</h4>
                    <div class="block-btn align-right">
                        <a th:href="@{/}" class="btn btn-danger btn-md-4">返回首页</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- ... end Top Header-Profile -->
<div class="container">

    <div class="row" th:if="${tag != null or kind != null}">


        <div class="col col-xl-8 order-xl-2 col-lg-12 order-lg-1 col-md-12 col-sm-12 col-12">
            <div id="newsfeed-items-grid" th:each="article:${articles}">

                <div class="ui-block">
                    <!-- Post -->

                    <article class="hentry post">

                        <div class="post__author author vcard inline-items">
                            <div class="author-date">
                                <a class="h4 post__author-name fn" th:href="@{/article(articleId=${article.getId()})}">[[${article.title}]]</a>
                                <div class="post__date">
                                    <time class="published" datetime="2017-03-24T18:18" th:text="${#dates.format(article.publishTime,'yyyy年MM月dd日')}">
                                    </time>
                                    <a th:href="@{/search(kindId=${article.getKindId()})}" style="margin: 0px 4px 2px 0px" class="post-category bg-breez-light" ><i class="fa fa-folder"></i>[[${article.kind.name}]] </a>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-4">
                                <img th:src="${article.img}" style="width: 220px;height: auto">
                            </div>
                            <div class="col-8">
                                <p>摘要：[[${article.introduce}]]...》<a style="color: cornflowerblue" th:href="@{/article(articleId=${article.getId()})}">阅读原文</a></p>
                            </div>
                        </div>



                        <div class="post-additional-info inline-items">

                            <a th:href="@{/search(tagId=${tag.getId()})}" style="margin: 0px 4px 2px 0px" class="post-category bg-blue-light" th:each="tag:${article.tags}">
                                <i class="fa fa-tag"></i>
                                [[${tag.name}]]</a>


                            <div class="comments-shared">
                                <a href="#" class="post-add-icon inline-items">
                                    <svg class="olymp-speech-balloon-icon">
                                        <use xlink:href="svg-icons/sprites/icons.svg#olymp-speech-balloon-icon"></use>
                                    </svg>
                                    <span th:if="${article.comment!=null}">评论：[[${article.comment}]]</span>
                                    <span th:if="${article.comment==null}">评论：0</span>

                                </a>
                                <a href="#" class="post-add-icon inline-items">
                                    <svg class="olymp-share-icon">
                                        <use xlink:href="svg-icons/sprites/icons.svg#olymp-share-icon"></use>
                                    </svg>
                                    <span>阅读:[[${article.readCount}]]</span>
                                </a>
                            </div>


                        </div>



                    </article>

                    <!-- .. end Post -->				</div>

            </div>

            <nav aria-label="Page navigation" th:if="${tag!=null}">
                <ul class="pagination justify-content-center">
                    <li class="page-item" th:if="${page != 1}">
                        <a class="page-link" th:href="@{search(page=1,tagId=${tag.getId()})}" tabindex="-1">第一页</a>
                    </li>
                    <li class="page-item"><a class="page-link" th:href="@{search(page=${page -1},tagId=${tag.getId()})}" th:if="${page > 2}">[[${page-1}]]</a></li>
                    <li class="page-item active"><a class="page-link" href="javaScript:Void(0)">[[${page}]]</a></li>
                    <li class="page-item"><a class="page-link" th:href="@{search(page=${page +1},tagId=${tag.getId()})}" th:if="${page < (totalPage -1)}">[[${page + 1}]]</a></li>

                    <li class="page-item" th:if="${page != totalPage}">
                        <a class="page-link" th:href="@{search(page=${totalPage},tagId=${tag.getId()})}">最后一页</a>
                    </li>
                    <li class="page-item disabled">
                        <a class="page-link" href="#" tabindex="-1">共：[[${totalPage}]]页</a>
                    </li>
                </ul>
            </nav>
            <nav aria-label="Page navigation" th:if="${kind!=null}">
                <ul class="pagination justify-content-center">
                    <li class="page-item" th:if="${page != 1}">
                        <a class="page-link" th:href="@{search(page=1,kindId=${kind.getId()})}" tabindex="-1">第一页</a>
                    </li>
                    <li class="page-item"><a class="page-link" th:href="@{search(page=${page -1},kindId=${kind.getId()})}" th:if="${page > 2}">[[${page-1}]]</a></li>
                    <li class="page-item active"><a class="page-link" href="javaScript:Void(0)">[[${page}]]</a></li>
                    <li class="page-item"><a class="page-link" th:href="@{search(page=${page +1},kindId=${kind.getId()})}" th:if="${page < (totalPage -1)}">[[${page + 1}]]</a></li>

                    <li class="page-item" th:if="${page != totalPage}">
                        <a class="page-link" th:href="@{search(page=${totalPage},kindId=${kind.getId()})}">最后一页</a>
                    </li>
                    <li class="page-item disabled">
                        <a class="page-link" href="#" tabindex="-1">共：[[${totalPage}]]页</a>
                    </li>
                </ul>
            </nav>

        </div>

        <div class="col col-xl-4 order-xl-2 col-lg-12 order-lg-1 col-md-12 col-sm-12 col-12">
            <!-- 分类/标签信息-->
            <article class="hentry blog-post blog-post-v3 featured-post-item">
                <div class="post-thumb" th:if="${kind != null}">
                    <img src="https://gitee.com/cn_moti/moti-img/raw/master/other/6e1aceb77d1e4b5e91e390fd9e136bd7.jpg" th:if="${kind.img == null}" alt="photo">
                    <img th:src="${kind.img}" th:if="${kind.img != null}" alt="photo">

                    <a href="#" class="post-category bg-purple">《[[${kind.name}]]》：[[${kind.introduce}]]</a>
                </div>
                <div class="post-thumb" th:if="${tag != null}">
                    <img src="https://gitee.com/cn_moti/moti-img/raw/master/other/6e1aceb77d1e4b5e91e390fd9e136bd7.jpg" th:if="${tag.img == null}" alt="photo">
                    <img th:src="${tag.img}" th:if="${tag.img != null}" alt="photo">
                    <a href="#" class="post-category bg-purple">《[[${tag.name}]]》：[[${tag.introduce}]]</a>
                </div>
            </article>
            <!--作者信息-->
            <div class="ui-block">
                <div class="ui-block-title">
                    <h6 class="title">个人名片</h6>
                </div>
                <div class="ui-block-content">

                    <!-- W-Personal-Info -->

                    <ul class="widget w-personal-info item-block">
                        <li>
                            <span class="h6 title">基本信息:</span>
                            <span class="text">昵称：[[${user.name}]]</span>
                            <span class="text">性别：[[${user.sex}]]</span>
                            <span class="text">年龄：[[${#dates.year(#dates.createNow()) - #dates.year(user.birthday)}]]</span>
                            <span class="text">生日：[[${#dates.format(user.birthday,'MM-dd')}]]</span>
                            <span th:if="${user.address.trim() != ''}" class="text">地区：[[${user.address}]]</span>
                            <span th:if="${user.info.trim() != ''}" class="text">职业：[[${user.career}]]</span>
                        </li>
                        <li>
                            <span class="h6 title">个人说明:</span>
                            <span class="text">[[${user.info}]]</span>
                        </li>

                    </ul>

                    <div class="widget w-socials">
                        <h6 class="title">联系方式:</h6>
                        <span th:if="${user.qq.trim() != ''}" class="social-item bg-facebook">
							<i class="iconfont icon-qq" aria-hidden="true"></i>
							[[${user.qq}]]
						</span>
                        <span th:if="${user.phone.trim() != ''}" class="social-item bg-twitter">
							<i class="fa fa-phone" aria-hidden="true"></i>
							[[${user.phone}]]
						</span>
                        <span th:if="${user.email.trim() != ''}" class="social-item bg-dribbble">
							<i class="fa fa-envelope" aria-hidden="true"></i>
							[[${user.email}]]
						</span>
                    </div>


                    <!-- ... end W-Socials -->
                </div>
            </div>
        </div>
    </div>


    <div class="row" th:if="${tag == null and kind == null}">

        <!-- Main Content -->

        <div class="col col-xl-8 order-xl-2 col-lg-12 order-lg-1 col-md-12 col-sm-12 col-12">
            <div id="newsfeed-items-grid" th:each="article:${articles}">

                <div class="ui-block">
                    <!-- Post -->

                    <article class="hentry post">

                        <div class="post__author author vcard inline-items">
                            <div class="author-date">
                                <a class="h4 post__author-name fn" th:href="@{/article(articleId=${article.getId()})}">[[${article.title}]]</a>
                                <div class="post__date">
                                    <time class="published" datetime="2017-03-24T18:18" th:text="${#dates.format(article.publishTime,'yyyy年MM月dd日')}">
                                    </time>
                                    <a th:href="@{/search(kindId=${article.getKindId()})}" style="margin: 0px 4px 2px 0px" class="post-category bg-breez-light" ><i class="fa fa-folder"></i>[[${article.kind.name}]] </a>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-4">
                                <img th:src="${article.img}" style="width: 220px;height: auto">
                            </div>
                            <div class="col-8">
                                <p>摘要：[[${article.introduce}]]...》<a style="color: cornflowerblue" th:href="@{/article(articleId=${article.getId()})}">阅读原文</a></p>
                            </div>
                        </div>



                        <div class="post-additional-info inline-items">

                            <a th:href="@{/search(tagId=${tag.getId()})}" style="margin: 0px 4px 2px 0px" class="post-category bg-blue-light" th:each="tag:${article.tags}">
                                <i class="fa fa-tag"></i>
                                [[${tag.name}]]</a>


                            <div class="comments-shared">
                                <a href="#" class="post-add-icon inline-items">
                                    <svg class="olymp-speech-balloon-icon">
                                        <use xlink:href="svg-icons/sprites/icons.svg#olymp-speech-balloon-icon"></use>
                                    </svg>
                                    <span th:if="${article.comment!=null}">评论：[[${article.comment}]]</span>
                                    <span th:if="${article.comment==null}">评论：0</span>

                                </a>
                                <a href="#" class="post-add-icon inline-items">
                                    <svg class="olymp-share-icon">
                                        <use xlink:href="svg-icons/sprites/icons.svg#olymp-share-icon"></use>
                                    </svg>
                                    <span>阅读:[[${article.readCount}]]</span>
                                </a>
                            </div>


                        </div>



                    </article>

                    <!-- .. end Post -->				</div>

            </div>
            <nav aria-label="Page navigation" th:if="${date!=null}">
                <ul class="pagination justify-content-center">
                    <li class="page-item" th:if="${page != 1}">
                        <a class="page-link" th:href="@{search(page=1,date=${date})}" tabindex="-1">第一页</a>
                    </li>
                    <li class="page-item"><a class="page-link" th:href="@{search(page=${page -1},date=${date})}" th:if="${page > 2}">[[${page-1}]]</a></li>
                    <li class="page-item active"><a class="page-link" href="javaScript:Void(0)">[[${page}]]</a></li>
                    <li class="page-item"><a class="page-link" th:href="@{search(page=${page +1},date=${date})}" th:if="${page < (totalPage -1)}">[[${page + 1}]]</a></li>

                    <li class="page-item" th:if="${page != totalPage}">
                        <a class="page-link" th:href="@{search(page=${totalPage},date=${date})}">最后一页</a>
                    </li>
                    <li class="page-item disabled">
                        <a class="page-link" href="#" tabindex="-1">共：[[${totalPage}]]页</a>
                    </li>
                </ul>
            </nav>
            <nav aria-label="Page navigation" th:if="${msg!=null}">
                <ul class="pagination justify-content-center">
                    <li class="page-item" th:if="${page != 1}">
                        <a class="page-link" th:href="@{search(page=1,msg=${msg})}" tabindex="-1">第一页</a>
                    </li>
                    <li class="page-item"><a class="page-link" th:href="@{search(page=${page -1},msg=${msg})}" th:if="${page > 2}">[[${page-1}]]</a></li>
                    <li class="page-item active"><a class="page-link" href="javaScript:Void(0)">[[${page}]]</a></li>
                    <li class="page-item"><a class="page-link" th:href="@{search(page=${page +1},msg=${msg})}" th:if="${page < (totalPage -1)}">[[${page + 1}]]</a></li>

                    <li class="page-item" th:if="${page != totalPage}">
                        <a class="page-link" th:href="@{search(page=${totalPage},msg=${msg})}">最后一页</a>
                    </li>
                    <li class="page-item disabled">
                        <a class="page-link" href="#" tabindex="-1">共：[[${totalPage}]]页</a>
                    </li>
                </ul>
            </nav>

        </div>

        <!-- ... end Main Content -->
        <div class="col col-xl-4 order-xl-2 col-lg-12 order-lg-1 col-md-12 col-sm-12 col-12">
            <!--作者信息-->
            <div class="ui-block">
                <div class="ui-block-title">
                    <h6 class="title">个人名片</h6>
                </div>
                <div class="ui-block-content">

                    <!-- W-Personal-Info -->

                    <ul class="widget w-personal-info item-block">
                        <li>
                            <span class="h6 title">基本信息:</span>
                            <span class="text">昵称：[[${user.name}]]</span>
                            <span class="text">性别：[[${user.sex}]]</span>
                            <span class="text">年龄：[[${#dates.year(#dates.createNow()) - #dates.year(user.birthday)}]]</span>
                            <span class="text">生日：[[${#dates.format(user.birthday,'MM-dd')}]]</span>
                            <span th:if="${user.address.trim() != ''}" class="text">地区：[[${user.address}]]</span>
                            <span th:if="${user.info.trim() != ''}" class="text">职业：[[${user.career}]]</span>
                        </li>
                        <li>
                            <span class="h6 title">个人说明:</span>
                            <span class="text">[[${user.info}]]</span>
                        </li>

                    </ul>

                    <div class="widget w-socials">
                        <h6 class="title">联系方式:</h6>
                        <span th:if="${user.qq.trim() != ''}" class="social-item bg-facebook">
							<i class="iconfont icon-qq" aria-hidden="true"></i>
							[[${user.qq}]]
						</span>
                        <span th:if="${user.phone.trim() != ''}" class="social-item bg-twitter">
							<i class="fa fa-phone" aria-hidden="true"></i>
							[[${user.phone}]]
						</span>
                        <span th:if="${user.email.trim() != ''}" class="social-item bg-dribbble">
							<i class="fa fa-envelope" aria-hidden="true"></i>
							[[${user.email}]]
						</span>
                    </div>


                    <!-- ... end W-Socials -->
                </div>
            </div>
        </div>

    </div>
</div>

<!-- ... end Window-popup-CHAT for responsive min-width: 768px -->
<!--back to top-->
<a class="back-to-top" href="#">
    <img src="front/svg-icons/back-to-top.svg" alt="arrow" class="back-icon">
</a>

<!-- JS Scripts -->
<script src="common/js/jquery-3.4.1.js"></script>
<script src="front/js/libs/jquery.appear.js"></script>
<script src="front/js/libs/jquery.mousewheel.js"></script>
<script src="front/js/libs/perfect-scrollbar.js"></script>
<script src="front/js/libs/jquery.matchHeight.js"></script>
<script src="front/js/libs/svgxuse.js"></script>
<script src="front/js/libs/imagesloaded.pkgd.js"></script>
<script src="front/js/libs/Headroom.js"></script>
<script src="front/js/libs/velocity.js"></script>
<script src="front/js/libs/ScrollMagic.js"></script>
<script src="front/js/libs/jquery.waypoints.js"></script>
<script src="front/js/libs/jquery.countTo.js"></script>
<script src="front/js/libs/popper.min.js"></script>
<script src="front/js/libs/material.min.js"></script>
<script src="front/js/libs/bootstrap-select.js"></script>
<script src="front/js/libs/smooth-scroll.js"></script>
<script src="front/js/libs/selectize.js"></script>
<script src="front/js/libs/swiper.jquery.js"></script>
<script src="front/js/libs/moment.js"></script>
<script src="front/js/libs/daterangepicker.js"></script>
<script src="front/js/libs/fullcalendar.js"></script>
<script src="front/js/libs/isotope.pkgd.js"></script>
<script src="front/js/libs/ajax-pagination.js"></script>
<script src="front/js/libs/Chart.js"></script>
<script src="front/js/libs/chartjs-plugin-deferred.js"></script>
<script src="front/js/libs/circle-progress.js"></script>
<script src="front/js/libs/loader.js"></script>
<script src="front/js/libs/run-chart.js"></script>
<script src="front/js/libs/jquery.magnific-popup.js"></script>
<script src="front/js/libs/jquery.gifplayer.js"></script>
<script src="front/js/libs/mediaelement-and-player.js"></script>
<script src="front/js/libs/mediaelement-playlist-plugin.min.js"></script>
<script src="front/js/libs/sticky-sidebar.js"></script>
<script src="front/js/libs/ion.rangeSlider.js"></script>

<script src="front/js/main.js"></script>
<script src="front/js/libs-init/libs-init.js"></script>
<script defer src="front/fonts/fontawesome-all.js"></script>
<script src="common/js/sweetalert.min.js"></script>

<script src="front/Bootstrap/dist/js/bootstrap.bundle.js"></script>
</body>
</html>